<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport"
	content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<title>邮宝洗衣</title>
<link href="../../css/style2app.css" rel="stylesheet" type="text/css">
<link href="../../css/type.css" rel="stylesheet" type="text/css">
<style type="text/css">
/*<![CDATA[*/
* html .decoration {
	position: absolute;
	right: 16px;
	top: 0;
} /*only for ie*/
/*]]>*/
</style>
<!-- Do not move the bellow script to custom.js! It must stay here to
    load properly! -->
<script type="text/javascript" src="../../scripts/jquery.js"></script>
<script type="text/javascript" src="../../scripts/custom2app.js" charset="utf-8"></script>
<script type="text/javascript" src="../../scripts/jquerysession.js"></script>
<script type="text/javascript" src="../../scripts/layer/layer.m.js"></script>
</head>
<body onLoad="loadImages()">
	<p class="no-mobile">
		请使用手机访问本页面！ <br /> 这个页面是专门针对手机设计的！
	</p>
	<div class="site">
		<div id="hidepage">
			<p class="center-text">
				加载中，请耐心等待! <br /> <img src="../../images/background/130.gif"
					alt="load">
			</p>
		</div>
		<div class="decoration">
			<div class="back">
				<a href="javascript:void(0)">
					<img src="../../images/home/back.png">
				</a>
			</div> 
			<p class="title" style="width: 33%;float: left;">地址管理</p>
			<div style="width: 33%">
			</div> 
		</div>
		<div id="wrapper">
		</div>
	</div>
	<script type="text/javascript">
	 $(document).ready(function () {
		 $.post("../../transactionRouter2app?funcID=0002&platformId="+$.session.get("platformId"), function(v) {
			 $("#wrapper").html(v);
		});
	 });
	 $(".btn_del").live("click",function(){
		 var url = "../../transactionRouter2app?funcID=0011&addrID="+$(this).attr("addrID");
		 $.post(url, function(v) {
			 if(v.responseCode=="00000"){
				 	layer.open({content: '删除成功！',time: 2,end: function(){location.href = "addrmanage.jsp";}});
				}else{
					layer.open({content: '删除失败，请重试！',time: 2});
				}
		 });
	 });
	 $(".btn_update").live("click",function(){
		location.href = "updateaddr.jsp?addrID="+$(this).attr("addrID");
	 });
	 $(".btn_complete").live("click",function(){
		 if($.session.get("totalNum")!=0){
			 $.session.remove("receiveAddr");
			 $.session.remove("name");
			 $.session.remove("mobileNum");
			 $.session.set("receiveAddr",encodeURIComponent($(".addrboxCheck").find(".addressconent .address").html()));
			 $.session.set("name",encodeURIComponent($(".addrboxCheck").find(".addressconent .home_name").html()));
			 $.session.set("mobileNum",encodeURIComponent($(".addrboxCheck").find(".addressconent .tel").html()));
			 location.href = "../home/getcloth.jsp";
		}else{
			location.href = "../../index.jsp?toPage=2";
		}
	 });
	 $(".back").live("click",function(){
		 if($.session.get("totalNum")!=0){
			 location.href = "../home/getcloth.jsp";
		}else{
			location.href = "../../index.jsp?toPage=2";
		}
	 });
	 function loadImages() {
	        if (document.getElementById) { // DOM3 = IE5, NS6
	            document.getElementById('hidepage').style.visibility = 'hidden';
	        } else {
	            if (document.layers) { // Netscape 4
	                document.hidepage.visibility = 'hidden';
	            } else { // IE 4
	                document.all.hidepage.style.visibility = 'hidden';
	            }
	        }
	        var openid=$.session.get("platformId");
	        if(typeof openid == "undefined"||openid==""){
	        	location.href = "../returnMsg.jsp?isapp=0"
				//layer.open({content: '请先注册！',time: 2,end: function(){location.href = "../returnMsg.jsp?isapp=0"}});
			}
	    }
	</script>
</body>
</html>